/*
 * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 *  http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package com.amazonaws.services.cognitoidentityprovider.model;

import java.io.Serializable;

/**
 * <p>
 * A list of the user attributes and their properties in your user pool. The
 * attribute schema contains standard attributes, custom attributes with a
 * <code>custom:</code> prefix, and developer attributes with a
 * <code>dev:</code> prefix. For more information, see <a href=
 * "https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html"
 * >User pool attributes</a>.
 * </p>
 * <p>
 * Developer-only attributes are a legacy feature of user pools, are read-only
 * to all app clients. You can create and update developer-only attributes only
 * with IAM-authenticated API operations. Use app client read/write permissions
 * instead.
 * </p>
 */
public class SchemaAttributeType implements Serializable {
    /**
     * <p>
     * The name of your user pool attribute, for example <code>username</code>
     * or <code>custom:costcenter</code>.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Length: </b>1 - 20<br/>
     * <b>Pattern: </b>[\p{L}\p{M}\p{S}\p{N}\p{P}]+<br/>
     */
    private String name;

    /**
     * <p>
     * The data format of the values for your attribute.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Allowed Values: </b>String, Number, DateTime, Boolean
     */
    private String attributeDataType;

    /**
     * <note>
     * <p>
     * You should use <a href=
     * "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     * >WriteAttributes</a> in the user pool client to control how attributes
     * can be mutated for new use cases instead of using
     * <code>DeveloperOnlyAttribute</code>.
     * </p>
     * </note>
     * <p>
     * Specifies whether the attribute type is developer only. This attribute
     * can only be modified by an administrator. Users won't be able to modify
     * this attribute using their access token. For example,
     * <code>DeveloperOnlyAttribute</code> can be modified using
     * AdminUpdateUserAttributes but can't be updated using
     * UpdateUserAttributes.
     * </p>
     */
    private Boolean developerOnlyAttribute;

    /**
     * <p>
     * Specifies whether the value of the attribute can be changed.
     * </p>
     * <p>
     * Any user pool attribute whose value you map from an IdP attribute must be
     * mutable, with a parameter value of <code>true</code>. Amazon Cognito
     * updates mapped attributes when users sign in to your application through
     * an IdP. If an attribute is immutable, Amazon Cognito throws an error when
     * it attempts to update the attribute. For more information, see <a href=
     * "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     * >Specifying Identity Provider Attribute Mappings for Your User Pool</a>.
     * </p>
     */
    private Boolean mutable;

    /**
     * <p>
     * Specifies whether a user pool attribute is required. If the attribute is
     * required and the user doesn't provide a value, registration or sign-in
     * will fail.
     * </p>
     */
    private Boolean required;

    /**
     * <p>
     * Specifies the constraints for an attribute of the number type.
     * </p>
     */
    private NumberAttributeConstraintsType numberAttributeConstraints;

    /**
     * <p>
     * Specifies the constraints for an attribute of the string type.
     * </p>
     */
    private StringAttributeConstraintsType stringAttributeConstraints;

    /**
     * <p>
     * The name of your user pool attribute, for example <code>username</code>
     * or <code>custom:costcenter</code>.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Length: </b>1 - 20<br/>
     * <b>Pattern: </b>[\p{L}\p{M}\p{S}\p{N}\p{P}]+<br/>
     *
     * @return <p>
     *         The name of your user pool attribute, for example
     *         <code>username</code> or <code>custom:costcenter</code>.
     *         </p>
     */
    public String getName() {
        return name;
    }

    /**
     * <p>
     * The name of your user pool attribute, for example <code>username</code>
     * or <code>custom:costcenter</code>.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Length: </b>1 - 20<br/>
     * <b>Pattern: </b>[\p{L}\p{M}\p{S}\p{N}\p{P}]+<br/>
     *
     * @param name <p>
     *            The name of your user pool attribute, for example
     *            <code>username</code> or <code>custom:costcenter</code>.
     *            </p>
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * <p>
     * The name of your user pool attribute, for example <code>username</code>
     * or <code>custom:costcenter</code>.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Length: </b>1 - 20<br/>
     * <b>Pattern: </b>[\p{L}\p{M}\p{S}\p{N}\p{P}]+<br/>
     *
     * @param name <p>
     *            The name of your user pool attribute, for example
     *            <code>username</code> or <code>custom:costcenter</code>.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     */
    public SchemaAttributeType withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * <p>
     * The data format of the values for your attribute.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Allowed Values: </b>String, Number, DateTime, Boolean
     *
     * @return <p>
     *         The data format of the values for your attribute.
     *         </p>
     * @see AttributeDataType
     */
    public String getAttributeDataType() {
        return attributeDataType;
    }

    /**
     * <p>
     * The data format of the values for your attribute.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Allowed Values: </b>String, Number, DateTime, Boolean
     *
     * @param attributeDataType <p>
     *            The data format of the values for your attribute.
     *            </p>
     * @see AttributeDataType
     */
    public void setAttributeDataType(String attributeDataType) {
        this.attributeDataType = attributeDataType;
    }

    /**
     * <p>
     * The data format of the values for your attribute.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Allowed Values: </b>String, Number, DateTime, Boolean
     *
     * @param attributeDataType <p>
     *            The data format of the values for your attribute.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     * @see AttributeDataType
     */
    public SchemaAttributeType withAttributeDataType(String attributeDataType) {
        this.attributeDataType = attributeDataType;
        return this;
    }

    /**
     * <p>
     * The data format of the values for your attribute.
     * </p>
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Allowed Values: </b>String, Number, DateTime, Boolean
     *
     * @param attributeDataType <p>
     *            The data format of the values for your attribute.
     *            </p>
     * @see AttributeDataType
     */
    public void setAttributeDataType(AttributeDataType attributeDataType) {
        this.attributeDataType = attributeDataType.toString();
    }

    /**
     * <p>
     * The data format of the values for your attribute.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     * <p>
     * <b>Constraints:</b><br/>
     * <b>Allowed Values: </b>String, Number, DateTime, Boolean
     *
     * @param attributeDataType <p>
     *            The data format of the values for your attribute.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     * @see AttributeDataType
     */
    public SchemaAttributeType withAttributeDataType(AttributeDataType attributeDataType) {
        this.attributeDataType = attributeDataType.toString();
        return this;
    }

    /**
     * <note>
     * <p>
     * You should use <a href=
     * "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     * >WriteAttributes</a> in the user pool client to control how attributes
     * can be mutated for new use cases instead of using
     * <code>DeveloperOnlyAttribute</code>.
     * </p>
     * </note>
     * <p>
     * Specifies whether the attribute type is developer only. This attribute
     * can only be modified by an administrator. Users won't be able to modify
     * this attribute using their access token. For example,
     * <code>DeveloperOnlyAttribute</code> can be modified using
     * AdminUpdateUserAttributes but can't be updated using
     * UpdateUserAttributes.
     * </p>
     *
     * @return <note>
     *         <p>
     *         You should use <a href=
     *         "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     *         >WriteAttributes</a> in the user pool client to control how
     *         attributes can be mutated for new use cases instead of using
     *         <code>DeveloperOnlyAttribute</code>.
     *         </p>
     *         </note>
     *         <p>
     *         Specifies whether the attribute type is developer only. This
     *         attribute can only be modified by an administrator. Users won't
     *         be able to modify this attribute using their access token. For
     *         example, <code>DeveloperOnlyAttribute</code> can be modified
     *         using AdminUpdateUserAttributes but can't be updated using
     *         UpdateUserAttributes.
     *         </p>
     */
    public Boolean isDeveloperOnlyAttribute() {
        return developerOnlyAttribute;
    }

    /**
     * <note>
     * <p>
     * You should use <a href=
     * "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     * >WriteAttributes</a> in the user pool client to control how attributes
     * can be mutated for new use cases instead of using
     * <code>DeveloperOnlyAttribute</code>.
     * </p>
     * </note>
     * <p>
     * Specifies whether the attribute type is developer only. This attribute
     * can only be modified by an administrator. Users won't be able to modify
     * this attribute using their access token. For example,
     * <code>DeveloperOnlyAttribute</code> can be modified using
     * AdminUpdateUserAttributes but can't be updated using
     * UpdateUserAttributes.
     * </p>
     *
     * @return <note>
     *         <p>
     *         You should use <a href=
     *         "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     *         >WriteAttributes</a> in the user pool client to control how
     *         attributes can be mutated for new use cases instead of using
     *         <code>DeveloperOnlyAttribute</code>.
     *         </p>
     *         </note>
     *         <p>
     *         Specifies whether the attribute type is developer only. This
     *         attribute can only be modified by an administrator. Users won't
     *         be able to modify this attribute using their access token. For
     *         example, <code>DeveloperOnlyAttribute</code> can be modified
     *         using AdminUpdateUserAttributes but can't be updated using
     *         UpdateUserAttributes.
     *         </p>
     */
    public Boolean getDeveloperOnlyAttribute() {
        return developerOnlyAttribute;
    }

    /**
     * <note>
     * <p>
     * You should use <a href=
     * "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     * >WriteAttributes</a> in the user pool client to control how attributes
     * can be mutated for new use cases instead of using
     * <code>DeveloperOnlyAttribute</code>.
     * </p>
     * </note>
     * <p>
     * Specifies whether the attribute type is developer only. This attribute
     * can only be modified by an administrator. Users won't be able to modify
     * this attribute using their access token. For example,
     * <code>DeveloperOnlyAttribute</code> can be modified using
     * AdminUpdateUserAttributes but can't be updated using
     * UpdateUserAttributes.
     * </p>
     *
     * @param developerOnlyAttribute <note>
     *            <p>
     *            You should use <a href=
     *            "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     *            >WriteAttributes</a> in the user pool client to control how
     *            attributes can be mutated for new use cases instead of using
     *            <code>DeveloperOnlyAttribute</code>.
     *            </p>
     *            </note>
     *            <p>
     *            Specifies whether the attribute type is developer only. This
     *            attribute can only be modified by an administrator. Users
     *            won't be able to modify this attribute using their access
     *            token. For example, <code>DeveloperOnlyAttribute</code> can be
     *            modified using AdminUpdateUserAttributes but can't be updated
     *            using UpdateUserAttributes.
     *            </p>
     */
    public void setDeveloperOnlyAttribute(Boolean developerOnlyAttribute) {
        this.developerOnlyAttribute = developerOnlyAttribute;
    }

    /**
     * <note>
     * <p>
     * You should use <a href=
     * "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     * >WriteAttributes</a> in the user pool client to control how attributes
     * can be mutated for new use cases instead of using
     * <code>DeveloperOnlyAttribute</code>.
     * </p>
     * </note>
     * <p>
     * Specifies whether the attribute type is developer only. This attribute
     * can only be modified by an administrator. Users won't be able to modify
     * this attribute using their access token. For example,
     * <code>DeveloperOnlyAttribute</code> can be modified using
     * AdminUpdateUserAttributes but can't be updated using
     * UpdateUserAttributes.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     *
     * @param developerOnlyAttribute <note>
     *            <p>
     *            You should use <a href=
     *            "https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UserPoolClientType.html#CognitoUserPools-Type-UserPoolClientType-WriteAttributes"
     *            >WriteAttributes</a> in the user pool client to control how
     *            attributes can be mutated for new use cases instead of using
     *            <code>DeveloperOnlyAttribute</code>.
     *            </p>
     *            </note>
     *            <p>
     *            Specifies whether the attribute type is developer only. This
     *            attribute can only be modified by an administrator. Users
     *            won't be able to modify this attribute using their access
     *            token. For example, <code>DeveloperOnlyAttribute</code> can be
     *            modified using AdminUpdateUserAttributes but can't be updated
     *            using UpdateUserAttributes.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     */
    public SchemaAttributeType withDeveloperOnlyAttribute(Boolean developerOnlyAttribute) {
        this.developerOnlyAttribute = developerOnlyAttribute;
        return this;
    }

    /**
     * <p>
     * Specifies whether the value of the attribute can be changed.
     * </p>
     * <p>
     * Any user pool attribute whose value you map from an IdP attribute must be
     * mutable, with a parameter value of <code>true</code>. Amazon Cognito
     * updates mapped attributes when users sign in to your application through
     * an IdP. If an attribute is immutable, Amazon Cognito throws an error when
     * it attempts to update the attribute. For more information, see <a href=
     * "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     * >Specifying Identity Provider Attribute Mappings for Your User Pool</a>.
     * </p>
     *
     * @return <p>
     *         Specifies whether the value of the attribute can be changed.
     *         </p>
     *         <p>
     *         Any user pool attribute whose value you map from an IdP attribute
     *         must be mutable, with a parameter value of <code>true</code>.
     *         Amazon Cognito updates mapped attributes when users sign in to
     *         your application through an IdP. If an attribute is immutable,
     *         Amazon Cognito throws an error when it attempts to update the
     *         attribute. For more information, see <a href=
     *         "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     *         >Specifying Identity Provider Attribute Mappings for Your User
     *         Pool</a>.
     *         </p>
     */
    public Boolean isMutable() {
        return mutable;
    }

    /**
     * <p>
     * Specifies whether the value of the attribute can be changed.
     * </p>
     * <p>
     * Any user pool attribute whose value you map from an IdP attribute must be
     * mutable, with a parameter value of <code>true</code>. Amazon Cognito
     * updates mapped attributes when users sign in to your application through
     * an IdP. If an attribute is immutable, Amazon Cognito throws an error when
     * it attempts to update the attribute. For more information, see <a href=
     * "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     * >Specifying Identity Provider Attribute Mappings for Your User Pool</a>.
     * </p>
     *
     * @return <p>
     *         Specifies whether the value of the attribute can be changed.
     *         </p>
     *         <p>
     *         Any user pool attribute whose value you map from an IdP attribute
     *         must be mutable, with a parameter value of <code>true</code>.
     *         Amazon Cognito updates mapped attributes when users sign in to
     *         your application through an IdP. If an attribute is immutable,
     *         Amazon Cognito throws an error when it attempts to update the
     *         attribute. For more information, see <a href=
     *         "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     *         >Specifying Identity Provider Attribute Mappings for Your User
     *         Pool</a>.
     *         </p>
     */
    public Boolean getMutable() {
        return mutable;
    }

    /**
     * <p>
     * Specifies whether the value of the attribute can be changed.
     * </p>
     * <p>
     * Any user pool attribute whose value you map from an IdP attribute must be
     * mutable, with a parameter value of <code>true</code>. Amazon Cognito
     * updates mapped attributes when users sign in to your application through
     * an IdP. If an attribute is immutable, Amazon Cognito throws an error when
     * it attempts to update the attribute. For more information, see <a href=
     * "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     * >Specifying Identity Provider Attribute Mappings for Your User Pool</a>.
     * </p>
     *
     * @param mutable <p>
     *            Specifies whether the value of the attribute can be changed.
     *            </p>
     *            <p>
     *            Any user pool attribute whose value you map from an IdP
     *            attribute must be mutable, with a parameter value of
     *            <code>true</code>. Amazon Cognito updates mapped attributes
     *            when users sign in to your application through an IdP. If an
     *            attribute is immutable, Amazon Cognito throws an error when it
     *            attempts to update the attribute. For more information, see <a
     *            href=
     *            "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     *            >Specifying Identity Provider Attribute Mappings for Your User
     *            Pool</a>.
     *            </p>
     */
    public void setMutable(Boolean mutable) {
        this.mutable = mutable;
    }

    /**
     * <p>
     * Specifies whether the value of the attribute can be changed.
     * </p>
     * <p>
     * Any user pool attribute whose value you map from an IdP attribute must be
     * mutable, with a parameter value of <code>true</code>. Amazon Cognito
     * updates mapped attributes when users sign in to your application through
     * an IdP. If an attribute is immutable, Amazon Cognito throws an error when
     * it attempts to update the attribute. For more information, see <a href=
     * "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     * >Specifying Identity Provider Attribute Mappings for Your User Pool</a>.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     *
     * @param mutable <p>
     *            Specifies whether the value of the attribute can be changed.
     *            </p>
     *            <p>
     *            Any user pool attribute whose value you map from an IdP
     *            attribute must be mutable, with a parameter value of
     *            <code>true</code>. Amazon Cognito updates mapped attributes
     *            when users sign in to your application through an IdP. If an
     *            attribute is immutable, Amazon Cognito throws an error when it
     *            attempts to update the attribute. For more information, see <a
     *            href=
     *            "https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html"
     *            >Specifying Identity Provider Attribute Mappings for Your User
     *            Pool</a>.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     */
    public SchemaAttributeType withMutable(Boolean mutable) {
        this.mutable = mutable;
        return this;
    }

    /**
     * <p>
     * Specifies whether a user pool attribute is required. If the attribute is
     * required and the user doesn't provide a value, registration or sign-in
     * will fail.
     * </p>
     *
     * @return <p>
     *         Specifies whether a user pool attribute is required. If the
     *         attribute is required and the user doesn't provide a value,
     *         registration or sign-in will fail.
     *         </p>
     */
    public Boolean isRequired() {
        return required;
    }

    /**
     * <p>
     * Specifies whether a user pool attribute is required. If the attribute is
     * required and the user doesn't provide a value, registration or sign-in
     * will fail.
     * </p>
     *
     * @return <p>
     *         Specifies whether a user pool attribute is required. If the
     *         attribute is required and the user doesn't provide a value,
     *         registration or sign-in will fail.
     *         </p>
     */
    public Boolean getRequired() {
        return required;
    }

    /**
     * <p>
     * Specifies whether a user pool attribute is required. If the attribute is
     * required and the user doesn't provide a value, registration or sign-in
     * will fail.
     * </p>
     *
     * @param required <p>
     *            Specifies whether a user pool attribute is required. If the
     *            attribute is required and the user doesn't provide a value,
     *            registration or sign-in will fail.
     *            </p>
     */
    public void setRequired(Boolean required) {
        this.required = required;
    }

    /**
     * <p>
     * Specifies whether a user pool attribute is required. If the attribute is
     * required and the user doesn't provide a value, registration or sign-in
     * will fail.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     *
     * @param required <p>
     *            Specifies whether a user pool attribute is required. If the
     *            attribute is required and the user doesn't provide a value,
     *            registration or sign-in will fail.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     */
    public SchemaAttributeType withRequired(Boolean required) {
        this.required = required;
        return this;
    }

    /**
     * <p>
     * Specifies the constraints for an attribute of the number type.
     * </p>
     *
     * @return <p>
     *         Specifies the constraints for an attribute of the number type.
     *         </p>
     */
    public NumberAttributeConstraintsType getNumberAttributeConstraints() {
        return numberAttributeConstraints;
    }

    /**
     * <p>
     * Specifies the constraints for an attribute of the number type.
     * </p>
     *
     * @param numberAttributeConstraints <p>
     *            Specifies the constraints for an attribute of the number type.
     *            </p>
     */
    public void setNumberAttributeConstraints(
            NumberAttributeConstraintsType numberAttributeConstraints) {
        this.numberAttributeConstraints = numberAttributeConstraints;
    }

    /**
     * <p>
     * Specifies the constraints for an attribute of the number type.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     *
     * @param numberAttributeConstraints <p>
     *            Specifies the constraints for an attribute of the number type.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     */
    public SchemaAttributeType withNumberAttributeConstraints(
            NumberAttributeConstraintsType numberAttributeConstraints) {
        this.numberAttributeConstraints = numberAttributeConstraints;
        return this;
    }

    /**
     * <p>
     * Specifies the constraints for an attribute of the string type.
     * </p>
     *
     * @return <p>
     *         Specifies the constraints for an attribute of the string type.
     *         </p>
     */
    public StringAttributeConstraintsType getStringAttributeConstraints() {
        return stringAttributeConstraints;
    }

    /**
     * <p>
     * Specifies the constraints for an attribute of the string type.
     * </p>
     *
     * @param stringAttributeConstraints <p>
     *            Specifies the constraints for an attribute of the string type.
     *            </p>
     */
    public void setStringAttributeConstraints(
            StringAttributeConstraintsType stringAttributeConstraints) {
        this.stringAttributeConstraints = stringAttributeConstraints;
    }

    /**
     * <p>
     * Specifies the constraints for an attribute of the string type.
     * </p>
     * <p>
     * Returns a reference to this object so that method calls can be chained
     * together.
     *
     * @param stringAttributeConstraints <p>
     *            Specifies the constraints for an attribute of the string type.
     *            </p>
     * @return A reference to this updated object so that method calls can be
     *         chained together.
     */
    public SchemaAttributeType withStringAttributeConstraints(
            StringAttributeConstraintsType stringAttributeConstraints) {
        this.stringAttributeConstraints = stringAttributeConstraints;
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getName() != null)
            sb.append("Name: " + getName() + ",");
        if (getAttributeDataType() != null)
            sb.append("AttributeDataType: " + getAttributeDataType() + ",");
        if (getDeveloperOnlyAttribute() != null)
            sb.append("DeveloperOnlyAttribute: " + getDeveloperOnlyAttribute() + ",");
        if (getMutable() != null)
            sb.append("Mutable: " + getMutable() + ",");
        if (getRequired() != null)
            sb.append("Required: " + getRequired() + ",");
        if (getNumberAttributeConstraints() != null)
            sb.append("NumberAttributeConstraints: " + getNumberAttributeConstraints() + ",");
        if (getStringAttributeConstraints() != null)
            sb.append("StringAttributeConstraints: " + getStringAttributeConstraints());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode
                + ((getAttributeDataType() == null) ? 0 : getAttributeDataType().hashCode());
        hashCode = prime
                * hashCode
                + ((getDeveloperOnlyAttribute() == null) ? 0 : getDeveloperOnlyAttribute()
                        .hashCode());
        hashCode = prime * hashCode + ((getMutable() == null) ? 0 : getMutable().hashCode());
        hashCode = prime * hashCode + ((getRequired() == null) ? 0 : getRequired().hashCode());
        hashCode = prime
                * hashCode
                + ((getNumberAttributeConstraints() == null) ? 0 : getNumberAttributeConstraints()
                        .hashCode());
        hashCode = prime
                * hashCode
                + ((getStringAttributeConstraints() == null) ? 0 : getStringAttributeConstraints()
                        .hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof SchemaAttributeType == false)
            return false;
        SchemaAttributeType other = (SchemaAttributeType) obj;

        if (other.getName() == null ^ this.getName() == null)
            return false;
        if (other.getName() != null && other.getName().equals(this.getName()) == false)
            return false;
        if (other.getAttributeDataType() == null ^ this.getAttributeDataType() == null)
            return false;
        if (other.getAttributeDataType() != null
                && other.getAttributeDataType().equals(this.getAttributeDataType()) == false)
            return false;
        if (other.getDeveloperOnlyAttribute() == null ^ this.getDeveloperOnlyAttribute() == null)
            return false;
        if (other.getDeveloperOnlyAttribute() != null
                && other.getDeveloperOnlyAttribute().equals(this.getDeveloperOnlyAttribute()) == false)
            return false;
        if (other.getMutable() == null ^ this.getMutable() == null)
            return false;
        if (other.getMutable() != null && other.getMutable().equals(this.getMutable()) == false)
            return false;
        if (other.getRequired() == null ^ this.getRequired() == null)
            return false;
        if (other.getRequired() != null && other.getRequired().equals(this.getRequired()) == false)
            return false;
        if (other.getNumberAttributeConstraints() == null
                ^ this.getNumberAttributeConstraints() == null)
            return false;
        if (other.getNumberAttributeConstraints() != null
                && other.getNumberAttributeConstraints().equals(
                        this.getNumberAttributeConstraints()) == false)
            return false;
        if (other.getStringAttributeConstraints() == null
                ^ this.getStringAttributeConstraints() == null)
            return false;
        if (other.getStringAttributeConstraints() != null
                && other.getStringAttributeConstraints().equals(
                        this.getStringAttributeConstraints()) == false)
            return false;
        return true;
    }
}
